//import QtQuick 1.0
import QtWebKit 1.0
import Qt 4.7

Item {

    function mapHtmlFileName() {
         var url = "/htmls/" + cppEngine.mapProvider;
         return url;
         }

    function positionUpdated(lat, lon)
        {
        mapView.evaluateJavaScript("pan("+lat+","+lon+");");
        }

    Connections {
        target: cppEngine;
        onPosUpdated: positionUpdated(lat, lon)
    }

    WebView {
        id: mapView
        url: mapHtmlFileName()
        preferredWidth: parent.width
        preferredHeight: parent.height
        scale: 1
        smooth: false
    }
}
